package HomeWork.AdvancedStream;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.ObjectInputStream;

/**
 * 对象流的读取
 */
public class Practice021 {
    public static void main(String[] args) throws IOException, ClassNotFoundException {
        FileInputStream fis=new FileInputStream("cat.obb");
        ObjectInputStream ois=new ObjectInputStream(fis);
        Cat cat=(Cat)ois.readObject();
        System.out.println(cat);
        ois.close();
    }
}
